package cn.fourhundredandeighteen.view.StudentView.StudentFunction;

import cn.fourhundredandeighteen.controller.StudentController;
import cn.fourhundredandeighteen.entity.Course;
import cn.fourhundredandeighteen.utill.Result;
import cn.fourhundredandeighteen.utill.ViewUtill;

import javax.swing.*;
import java.util.List;

public class StudentSelectCourswInfo {
    public JScrollPane StudentSelectCourswInfo(Long studentSession) {
        StudentController studentController = new StudentController();
        Result<List<Course>> listResult = studentController.getCourseInfo(studentSession);  //获取未选课程
        List<Course> data = listResult.getData();
        JScrollPane jScrollPane = ViewUtill.viewCourseTable(data);
        return jScrollPane;
    }
}